<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>


<!-- 引入C标签 -->
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<html>

 <link href="css/css.css" rel="stylesheet" type="text/css">

  <head>
    <base href="<%=basePath%>">
    <title>用户登录系统</title>
  </head>
 
 <script type="text/javascript">
	 /**
	 *刷新验证码
	 */
	 function reloadImage()
	 {  
	     document.getElementById("identity").src="identityServlet?ts=" + new Date().getTime();  
	 } 
	 
	 /**
	 * 跳转到登录页面
	 */
	 function userRegistration()
	 {
		//重定向到注册页面
		window.location.href="register.jsp";
	 }
 
 </script>
 
  <body>
  
    <form name="form1" method="post" action="loginServlet">
	   <table width="933" border="0" align="center" cellpadding="0" cellspacing="0" style="margin:120px;">
  			<tr>
    			<td height="412" valign="top" background="images/bg_img1.jpg">
    					<table height="300" border="0" cellspacing="0">
    						<tr>
						        <td width="538">&nbsp;</td>
						        <td height="130" colspan="6">&nbsp;</td>
					        </tr>
	    			
					        <!-- 显示提示错误信息 -->
						    <tr>
						        <td rowspan="9">&nbsp;</td>
						        <td width="98" height="20" align="right">&nbsp;</td>
						        <td width="16">&nbsp;</td>
						        <td width="136"  class="text_red"><c:out value="${message}"></c:out></td>
						        <td width="55">&nbsp;</td>
						        <td width="44">&nbsp;</td>
						        <td width="32">&nbsp;</td>
						    </tr>
						    
						    
						    <!-- 用户名输入区 -->
						    <tr>
						        <td height="20" align="right"><img src="images/text_yh.gif" width="60" height="18"></td>
						        <td>&nbsp;</td>
						        <td><input name="username" type="text" id="username" size="18" /></td>
						        <td colspan="3">&nbsp;</td>
						     </tr>
						     <tr>
						        <td height="20"  align="right">&nbsp;</td>
						        <td colspan="5">&nbsp;</td>
						     </tr>
						    
						    <!-- 密码输入区 -->
						    <tr>
						        <td height="20" align="right"><img src="images/text_password.gif" width="60" height="18"></td>
						        <td>&nbsp;</td>
						        <td><input name="password" type="text" id="password" size="18" /></td>
						        <td colspan="3">&nbsp;</td>
						     </tr>
						     <tr>
						        <td height="20"  align="right">&nbsp;</td>
						        <td colspan="5">&nbsp;</td>
						     </tr>
						     
						     <!-- 验证码输入区 -->
						      <tr>
						        <td height="20" align="right"><img src="images/text_yzm.gif" width="60" height="18"></td>
						        <td>&nbsp;</td>
						        <td><input name="checkCode" type="text" id="checkCode" size="18" /></td>
						        <td><span class="text_cray1"><img src="identityServlet" id="identity" alt="点击刷新" height="30" onclick="reloadImage()"/></span></td>
						        <td colspan="2"></td>
     						 </tr>
     						 <tr>
						        <td height="20"  align="right">&nbsp;</td>
						        <td colspan="5">&nbsp;</td>
						     </tr>
						     
						     <!-- 登录注册按钮 -->
						     <tr>
						        <td height="20" colspan="2">&nbsp;</td>
						        <td colspan="2">
							        <table width="200" border="0" cellspacing="0">
							          <tr>
							            <td width="78"><input type="submit"  class="butlogin" value=""/></td>
							            <td>&nbsp;</td>
							            <td width="78"><input type="button"  class="butzc" onClick="userRegistration()"></td>
							          </tr>
							        </table>
						        </td>
						        <td colspan="2">&nbsp;</td>
						      </tr>
	    				</table>
    			</td>
    		</tr>
       </table>	
     </form>
  </body>
</html>
